fld_hour,
fld_min,
fld_sec,
+ fld_ns,
+ fld_ew,
fld_garmin_city,
fld_garmin_postal_code,
fld_garmin_state,
{ "year", fld_year, STR_LEFT },
{ "month", fld_month, STR_LEFT },
{ "day", fld_day, STR_LEFT },
+ { "n/s", fld_ns, STR_ANY },
+ { "e/w", fld_ew, STR_ANY },
/* garmin specials */
{ "addr", fld_garmin_addr, STR_ANY },
double d;
struct tm ymd;
int src_datum = unicsv_datum_idx;
+ int ns = 1;
+ int ew = 1;
wpt = waypt_new();
wpt->latitude = unicsv_unknown;
s = lrtrim(s);
if (! *s) continue; /* skip empty columns */
-
switch(unicsv_fields_tab[column]) {
case fld_time:
case fld_latitude:
human_to_dec( s, &wpt->latitude, &wpt->longitude, 1 );
+ wpt->latitude = wpt->latitude * ns;
break;
case fld_longitude:
human_to_dec( s, &wpt->latitude, &wpt->longitude, 2 );
+ wpt->longitude = wpt->longitude * ew;
break;
case fld_shortname:
case fld_datetime:
/* not implemented */
break;
-
+ case fld_ns:
+ ns = tolower(s[0]) == 'n' ? 1 : -1;
+ wpt->latitude *= ns;
+ break;
+ case fld_ew:
+ ew = tolower(s[0]) == 'e' ? 1 : -1;
+ wpt->longitude *= ew;
+ break;
case fld_garmin_city:
case fld_garmin_postal_code:
case fld_garmin_state:
depth = Depth
desc = Description
ele = Elevation (in meters) of the point
+ e/w = 'e' for eastern hemisphere, 'w' for western
fix = 3d, 2d, etc.
geschw = Geschwindigkeit (speed)
hdop = Horizontal dilution of precision
lat = Latitude
lon = Longitude
name = Waypoint name ("Shortname")
+ n/s = 'n' for northern hemisphere, 's' for southern
notes = Notes
pdop = Position dilution of precision
prox = Proximity